package jwdt.xadmin.system.action;

import jwdt.common.action.BaseAction;
import jwdt.xadmin.system.bean.TSystem;
import jwdt.xadmin.system.service.SystemManageService;

import com.ezerg.web.Form;
import com.ezerg.web.Module;
import com.ezerg.web.Page;
import com.ezerg.web.annotation.Controller;
import com.ezerg.web.annotation.RequestMapping;

@Controller("/xadmin/system")
public class SystemAction extends BaseAction {
	
	private SystemManageService systemManageService = (SystemManageService)app.getBean("systemManageService");
	
	@RequestMapping("/system")
	public Page doList(Form f, Module m) throws Exception {
		f.add("obj", systemManageService.doLoad(1));
		return m.defaultPage();
	}
	
	@RequestMapping("/editadminSystem")
	public Page doEdit(Form f, Module m) throws Exception {
		TSystem obj = (TSystem)f.copy2Class(TSystem.class);
		return m.getWritePage(f, systemManageService.doEditact(obj, 1));
	}
}
